import type { OrderResult } from "@/types/detail"
import { http } from "@/utils/http"

/**
 * 模拟发货-内测版
 * @description 在DEV环境下使用，仅在订单状态为待发货时，可模拟发货，调用后订单状态修改为待收货，包含模拟物流。
 * @param id 订单id
 */
export const getMemberOrderConsignmentByIdAPI = (id: string) => {
    return http({
      method: 'GET',
      url: `/member/order/consignment/${id}`,
    })
  }

  /**
 * 确认收货
 * @description 仅在订单状态为待收货时，可确认收货。
 * @param id 订单id
 */
export const putMemberOrderReceiptByIdAPI = (id: string) => {
    return http<OrderResult>({
      method: 'PUT',
      url: `/member/order/${id}/receipt`,
    })
  }